<% ' Method: DeleteDir(strDirPathName) ' ' Delete directory "sample" and its all files and directories. ' ' This file is provided as part of ASP Power Widgets Samples ' ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT ' WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, ' INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES ' OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR ' PURPOSE. ' Copyright 1997-1998. All rights reserved. ' Dalun Software Inc. ASP Power Widgets ' http://www.dalun.com ' http://members.tripod.com/ActiveServerPage/ sDir = "sample" sDirPathName = Server.MapPath("/") & "\" & sDir response.write "Directory """ & sDirPathName & _ """ to be deleted.
" Set oFDMgt = Server.CreateObject("ASPPW.FDMgt") iReturnCode = oFDMgt.DeleteDir (sDirPathName) select case iReturnCode case 1: response.write "Operation succeeds.
" case 0: response.write "Operation failed since """ & sDirPathName & """ is not found." case -1: response.write "Operation failed." case else: end select if oFDMgt.GetLastErrNum <> 0 then response.write oFDMgt.GetLastErrDescription end if Set oFDMgt = nothing %>